//package com.dal.interceptor;
//
//import com.jfinal.aop.Interceptor;
//import com.jfinal.aop.Invocation;
//import com.xiaoleilu.hutool.log.Log;
//import com.xiaoleilu.hutool.log.LogFactory;
//
///**
// * 玩家拦截器，拦截被冻结的玩家
// * Created by fxf on 2017-12-21.
// */
//public class PlayerInterceptor implements Interceptor {
//    static Log log = LogFactory.get(PlayerInterceptor.class);
//
//    @Override
//    public void intercept(Invocation inv) {
////        if (!(inv.getController() instanceof AccountController)) {
////            return;
////        }
////        AccountController controller = (AccountController) inv.getController();
////        String ip = controller.getPara(ParamKey.CLIENT_IP);
////        String accountId = controller.getPara(ParamKey.ACCOUNT_ID);
////        if (InterceptMappingCache.checkIntercept(InterceptConstant.INTERCEPT_TYPE_IP, ip)
////                || InterceptMappingCache.checkIntercept(InterceptConstant.INTERCEPT_TYPE_ACCOUNT_ID, accountId)) {
////            controller.renderError(LoginErrorCode.INTERCEPT_PLAYER, "玩家被冻结");
////        } else {
//            inv.invoke();
////        }
//    }
//}
